﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace WarOfDev.Web.Controllers
{
    public class ReportController : Controller
    {
        private EF.WarDevEntities db = new EF.WarDevEntities();

        //
        // GET: /Report/

        public ActionResult Index()
        {
            return View();
        }

        [HttpGet]
        public ActionResult GetReportData()
        {
            var reportData = db.Developers.Select(d => new { Developer = d.DomainAccount, Value = d.ExperienceValue }).ToList();

            return Json(reportData, JsonRequestBehavior.AllowGet);
        }

    }
}
